import request from "@/utils/request";
import { Result } from "./type/globale";
import { Login, LoginParam, Meber, WeChat } from "./type/login";
import { MeberAuahParam } from "./type/user";

//获取短信验证码
export const getSmsSendAPI=(phone:string)=>request.get<any,Result<string>>(`/sms/send/${phone}`)


//获取登录
export const postLoginAPI=(data:LoginParam)=>request.post<any,Result<Login>>('/user/login',data)

//获取会员信息
export const getMeberMessageAPI=()=>request.get<any,Result<Meber>>('/user/auth/getUserInfo')

//获取微信登录接口信息
export const getWeChatAPI=(wxRedirectUri:string)=>request.get<any,Result<WeChat>>(`/user/weixin/getLoginParam?wxRedirectUri=${wxRedirectUri}`)

//获取会员认证
export const postMeberAuahAPI=(data:MeberAuahParam)=>request.post(`/user/auth/userAuah`,data)